import { createStore } from 'vuex'
import {setToken,getToken} from "./localStorage";

export default createStore({

  state: {
    token:getToken() || {},
    // name: getName() || {}
    // loginhead: "", //登录头像
    // loginname: "", //登录名字
  },
  mutations: {
    setToken(state,tk){
      state.token=tk;
      setToken(tk)
    },
  },
  actions: {
  
  },
  modules: {
   }
})
